package com.woniuxy.store.client;

import com.woniuxy.store.client.param.ApplyParam;
import com.woniuxy.store.client.param.ModifyApplyParam;
import com.woniuxy.store.client.param.AddContractParam;
import com.woniuxy.store.client.result.ApplyDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import result.Result;

import java.io.IOException;

/**
* name是项目名，contextId是client的名字
*/
@FeignClient(contextId = "storeManageClient",name="store",path="/store/manage")
public interface StoreManageClient {

    @PostMapping("/apply")
    public Result apply(@RequestBody ApplyParam param);

    @PutMapping("/apply")
    public Result<ApplyDto> handApply(@RequestParam("applayId") Integer applayId,@RequestParam("storeProcessState") String storeProcessState) throws IOException;

    @PutMapping("/modify/apply")
    public Result<ApplyDto>  modifyApply(@RequestBody ModifyApplyParam param);

    @PostMapping("/contract")
    public Result addContract(@RequestBody AddContractParam param);


}
